%{
#include <stdio.h>
int yywrap(void);
int linenum;
void showTitle();
%}

%%

title			showTitle();
[\n]			++linenum;
[0-9]+			printf("Int	: %s\n", yytext);
[0-9]*\.[0-9]+	printf("Float	: %s\n", yytext);
[_a-zA-Z][_a-zA-Z0-9]* printf("Var	: %s\n", yytext);
[\+\-\*\/\%]	printf("Op	: %s\n", yytext);
.				printf("Unknown : %c\n", yytext[0]);
%%

void showTitle() {
	printf("---------------Lex example-----------------------");
}

int main() {
	linenum = 0;
	yylex();
	printf("\nLine Count: %d\n", linenum);
	return 0;
}

int yywrap(void) {
	return 1;
}
